package com.jeff.tianti.cms.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeff.tianti.common.entity.BaseEntity;
import com.jeff.tianti.common.util.DateUtils;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

@Entity
@Table(name = "consult")//咨询表-知识产权
public class Consult extends BaseEntity {
    private static final long serialVersionUID = -5102241269833494278L;
    public static final String CONSULT_STATE_ACCOMPLISH = "1";//咨询中
    public static final String CONSULT_STATE_ING = "0";//已完成
    @Column(name = "uid")//用户id
    private String uid;
    @Column(name = "consult_category_id")//咨询类型表主键id
    private String consultCategoryId;
    private String consultCategoryName;//咨询类型名称
    @Column(name = "problem_description")//问题描述
    private String problemDescription;
    @Column(name = "company_name")//公司名称
    private String companyName;
    @Column(name = "linkman")//联系人
    private String linkman;
    @Column(name = "phone")//联系电话
    private String phone;
    @Column(name = "reply")//回复
    private String reply;
    @Column(name = "state")//状态:0->咨询中 1->已完成
    private String state;
    @Column(name = "reply_date")//回复时间
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date replyDate ;
    private String createDateString;

    public String getCreateDateString() {
        return DateUtils.dateToString(createDate, "yyyy-MM-dd");
    }

    public void setCreateDateString(String createDateString) {
        this.createDateString = createDateString;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getReply() {
        return reply;
    }

    public void setReply(String reply) {
        this.reply = reply;
    }

    public Date getReplyDate() {
        return replyDate;
    }

    public void setReplyDate(Date replyDate) {
        this.replyDate = replyDate;
    }

    public String getConsultCategoryName() {
        return consultCategoryName;
    }

    public void setConsultCategoryName(String consultCategoryName) {
        this.consultCategoryName = consultCategoryName;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid == null ? null : uid.trim();
    }

    public String getConsultCategoryId() {
        return consultCategoryId;
    }

    public void setConsultCategoryId(String consultCategoryId) {
        this.consultCategoryId = consultCategoryId == null ? null : consultCategoryId.trim();
    }

    public String getProblemDescription() {
        return problemDescription;
    }

    public void setProblemDescription(String problemDescription) {
        this.problemDescription = problemDescription == null ? null : problemDescription.trim();
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName == null ? null : companyName.trim();
    }

    public String getLinkman() {
        return linkman;
    }

    public void setLinkman(String linkman) {
        this.linkman = linkman == null ? null : linkman.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

}